import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'

import MovieEdit from '../views/MovieEdit.vue'
import MovieList from '../views/MovieList.vue'
import BannerEdit from '../views/BannerEdit.vue'
import BannerList from '../views/BannerList.vue'
import TrailerEdit from '../views/TrailerEdit.vue'
import TrailerList from '../views/TrailerList.vue'
import UserList from '../views/UserList.vue'
import CommentList from '../views/CommentList.vue'
import MessagePost from '../views/MessagePost.vue'
import MessageNotice from '../views/MessageNotice.vue'
import MessageUser from '../views/MessageUser.vue'


Vue.use(VueRouter)

export default new VueRouter({
	mode: 'hash',
	routes: [{
		path: '/',
		name: 'Home',
		component: Home,
		children: [{
			path: 'movies/create',
			name: 'MovieEdit',
			component: MovieEdit
		}, {
			path: 'movies/edit/:id',
			name: 'MovieChange',
			component: MovieEdit
		}, {
			path: 'movies/list',
			name: 'MovieList',
			component: MovieList
		}, {
			path: 'banners/create',
			name: 'BannerEdit',
			component: BannerEdit
		}, {
			path: 'banners/edit/:id',
			name: 'BannerChange',
			component: BannerEdit
		}, {
			path: 'banners/list',
			name: 'BannerList',
			component: BannerList
		}, {
			path: 'trailers/create',
			name: 'TrailerEdit',
			component: TrailerEdit
		}, {
			path: 'trailers/edit/:id',
			name: 'TrailerChange',
			component: TrailerEdit
		}, {
			path: 'trailers/list',
			name: 'TrailerList',
			component: TrailerList
		}, {
			path: 'user/list',
			name: 'UserList',
			component: UserList
		},{
			path: 'comment/list',
			name: 'CommentList',
			component: CommentList
		},{
			path: 'message/noticepost',
			name: 'MessagePost',
			component: MessagePost
		},{
			path: 'message/notice',
			name: 'MessageNotice',
			component: MessageNotice
		},{
			path: 'message/user',
			name: 'MessageUser',
			component: MessageUser
		}]
	}, {
		path: '/login',
		name: 'Login',
		component: Login
	}]
})
